package com.project.bohang.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.project.bohang.entity.UserIsolate;
import com.project.bohang.mapper.UserIsolateMapper;
import com.project.bohang.pojo.dto.UserIsolateDto;
import com.project.bohang.pojo.vo.UserIsolateVo;
import com.project.bohang.pojo.vo.VisitVo;
import com.project.bohang.service.UserIsolateService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author bohang
 * @since 2022-03-27
 */
@Service
public class UserIsolateServiceImpl extends ServiceImpl<UserIsolateMapper, UserIsolate> implements UserIsolateService {

    @Resource
    private UserIsolateMapper userIsolateMapper;

    @Override
    public IPage<UserIsolateVo> selectList(UserIsolateDto dto) {
        IPage<UserIsolateVo> page = new Page<>(dto.getPageIndex(), dto.getPageSize());
        List<UserIsolateVo> list = userIsolateMapper.userIsolateList(page,dto);
        page.setRecords(list);
        return page;
    }
}
